/*      Copyright 2002 Arizona Board of regents on behalf of 
 *                  The University of Arizona 
 *                     All Rights Reserved 
 *         (USE & RESTRICTION - Please read COPYRIGHT file) 
 * 
 *  Version    : DEVSJAVA 2.7 
 *  Date       : 08-15-02 
 */ 


package SimpArc;

import java.awt.*;
import simView.*;
import genDevs.modeling.*;
import genDevs.simulation.*;
import GenCol.*;


public class netSwitch extends ViewableDigraph{


public netSwitch(){
    super("netSwitch");

    addInport("in");
    addOutport("out");

    ViewableDigraph ef = new ef("ef",20,500);

    ViewableAtomic s0 = new Switch("switch0",2.5);
    ViewableAtomic p0 = new proc("proc0",5);
    ViewableAtomic p1 = new proc("proc1",10);


     add(ef);
     add(s0);
     add(p0);
     add(p1);


  addTestInput("in",new entity("packet"));

     initialize();
     showState();

     addCoupling(this,"in",s0,"in");

     addCoupling(ef,"out",s0,"in");

     addCoupling(p0,"out",this,"out");
     addCoupling(p1,"out",this,"out");

     addCoupling(s0,"out",p0,"in");
     addCoupling(s0,"out1",p1,"in");

     addCoupling(p0,"out",ef,"in");
     addCoupling(p1,"out",ef,"in");
}


    /**
     * Automatically generated by the SimView program.
     * Do not edit this manually, as such changes will get overwritten.
     */
    public void layoutForSimView()
    {
        preferredSize = new Dimension(392, 368);
        ((ViewableComponent)withName("switch0")).setPreferredLocation(new Point(-13, 68));
        ((ViewableComponent)withName("proc0")).setPreferredLocation(new Point(120, 18));
        ((ViewableComponent)withName("proc1")).setPreferredLocation(new Point(119, 125));
        ((ViewableComponent)withName("ef")).setPreferredLocation(new Point(21, 200));
    }
}
